<!DOCTYPE html>
<html lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="X-UA-Compatible" content="ie=edge" />
		<meta name="author" content="xiaojiangK" />
		<meta name="email" content="740092856@qq.com" />
		<meta name="gitee" content="https://gitee.com/xiaojiangk/" />
		<meta name="viewport" content="width=1200, initial-scale=1.0" />
		<link rel="stylesheet" type="text/css" href="images/css/admin.min.css" />
		<link rel="stylesheet" type="text/css" href="images/css/datepicker.min.css" />
		<link rel="shortcut icon" href="images/logo.png" type="image/x-icon" />
		<title>admin-TimePicker</title>
	</head>
	<body>
		<div class="demo-main">
			<div class="admim-title">
				<h2>TimePicker 时间选择器</h2>
				<p>用于选择或输入日期</p>
			</div>
			<div class="item">
				<div class="title">
					<h3>时分秒单个选择 (HH:mm:ss 单个)</h3>
				</div>
				<div class="content time-picker">
					<qx-time name="name" placeholder="请选择时间" value="12:00:00"></qx-time>
				</div>
			</div>
			<div class="item">
				<div class="title">
					<h3>时分秒范围选择 (HH:mm:ss 范围)</h3>
				</div>
				<div class="content time-range">
					<qx-time-range name="name1,name2" value="12:00:00,18:00:00"></qx-time-range>
				</div>
			</div>
		</div>

		<div class="attributes">
			<h2>TimePicker Attributes</h2>
			<table>
				<thead>
					<tr>
						<th>参数</th>
						<th>说明</th>
						<th>类型</th>
						<th>可选值</th>
						<th>默认值</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>value</td>
						<td>input value值, range范围可用,分开</td>
						<td>string</td>
						<td>—</td>
						<td>—</td>
					</tr>
					<tr>
						<td>name</td>
						<td>原生 name 属性, range范围可用,分开</td>
						<td>string</td>
						<td>—</td>
						<td>—</td>
					</tr>
					<tr>
						<td>placeholder</td>
						<td>占位内容, range范围可用,分开</td>
						<td>string</td>
						<td>—</td>
						<td>—</td>
					</tr>
					<tr>
						<td>format</td>
						<td>datepicker 类型（JS对象传递）</td>
						<td>string</td>
						<td>YYYY-MM-DD / HH:mm:ss</td>
						<td>—</td>
					</tr>
					<tr>
						<td>isRange</td>
						<td>是否范围选择（JS对象传递）</td>
						<td>Boolean</td>
						<td>false</td>
						<td>false</td>
					</tr>
					<tr>
						<td>min</td>
						<td>时间最小值（JS对象传递）</td>
						<td>false/String</td>
						<td>false</td>
						<td>false</td>
					</tr>
					<tr>
						<td>max</td>
						<td>时间最大值（JS对象传递）</td>
						<td>false/String</td>
						<td>false</td>
						<td>false</td>
					</tr>
					<tr>
						<td>hasShortcut</td>
						<td>是否开启快捷选项（JS对象传递）</td>
						<td>Boolean</td>
						<td>false</td>
						<td>false</td>
					</tr>
					<tr>
						<td>shortcutOptions</td>
						<td>快捷选项配置参数（JS对象传递）</td>
						<td>Array</td>
						<td>[]</td>
						<td>[]</td>
					</tr>
					<tr>
						<td>between</td>
						<td>开始和结束值之间的时间间隔天数（只对范围有效；JS对象传递）</td>
						<td>false/Number</td>
						<td>false</td>
						<td>false</td>
					</tr>
				</tbody>
			</table>
			<h2>TimePicker Events</h2>
			<table>
				<thead>
					<tr>
						<th>事件名称</th>
						<th>说明</th>
						<th>回调参数</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>hide</td>
						<td>隐藏时触发的事件</td>
						<td>type（choose，confirm，shortcut，clickBody）, value值</td>
					</tr>
				</tbody>
			</table>
		</div>

		<script src="images/js/jquery.min.js"></script>
		<script src="images/js/datepicker.min.js"></script>
		<script src="images/js/admin.min.js"></script>
		<script>
			$(function () {
				$('.time-picker').DatePicker({
					format: 'HH:mm:ss',
					min: '06:00:00',
					max: '20:00:00',
					hide: function (val, type) {
						console.log(val, type)
					}
				})
				$('.time-range').DatePicker({
					format: 'HH:mm:ss',
					isRange: true,
					hide: function (val, type) {
						console.log(val, type)
					}
				})
			})
		</script>
	</body>
</html>
